#include <iostream>
#include "stack_queue.h"
#include <queue>
#include <stack>
using namespace std;

void test1() {
	int a[7] = { 0,1,2,3,4,5,6 };
	priority_queue<int, vector<int>, less<int>> pq(a, a + 7, less<int>(), vector<int>());

	while (!pq.empty())
	{
		cout << pq.top() << ' ';
		pq.pop();
	}
}

void test2() {
	lzc::stack<int> st;
	st.push(1);
	st.push(2);
	st.push(3);
	st.push(4);
	while (!st.empty())
	{
		cout << st.top() << ' ';
		st.pop();
	}
	cout << endl;

	lzc::queue<int> q;
	q.push(1);
	q.push(2);
	q.push(3);
	q.push(4);
	while (!q.empty())
	{
		cout << q.front() << ' ';
		q.pop();
	}
	cout << endl;

	lzc::priority_queue<int, vector<int>, lzc::greater<int>> pq;
	pq.push(1);
	pq.push(5);
	pq.push(7);
	pq.push(4);
	while (!pq.empty())
	{
		cout << pq.top() << ' ';
		pq.pop();
	}
	cout << endl;
}

void test4() {
	deque<int> dq;
	dq.push_back(1);
	dq.push_back(2);
	dq.push_back(3);
	dq.push_back(4);
	auto it = dq.begin();
}

void test5() {
	deque<int> cont = { 1, 2, 3, 4, 5 };

	deque<int>::iterator iter, tempIt;
	for (iter = cont.begin(); iter != cont.end();)
	{
		tempIt = iter;
		++iter;
		cont.erase(tempIt);
	}
}
int main()
{
	test5();
	return 0;
}